package com.tjw.ec.upms.api.feign.fallback;

import com.tjw.ec.common.core.util.Response;
import com.tjw.ec.upms.api.dto.PermitVO;
import com.tjw.ec.upms.api.feign.RemotePermitService;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 远程调用异常处理 : 由tb_Module与tb_Action两表结合产生的系统基本权限表;
 *
 * @author T-junwen
 * @email t-junwen@foxmail.com
 * @date 2019-08-02 11:58:44
 */
@Slf4j
@Component
public class RemotePermitServiceFallbackImpl implements RemotePermitService {

    @Setter
    private Throwable cause;


    /**
     * @param userId
     * @Title: 根据用户编号获取用户权限
     * @Param: [userId]
     * @return: com.tjw.ec.common.core.util.Response<java.util.List < com.tjw.ec.upms.api.dto.PermitVO>>
     * @Author: 田俊文
     * @Date: 2019/8/2 15:00
     * @Throws:
     */
    @Override
    public Response<List<PermitVO>> getPermitByUserId(String userId) {
        log.error("RemotePermitServiceFallbackImpl -》 getPermitByUserId 服务调用异常！");
        return Response.faile();
    }
}

